﻿using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Service
{
    public class LogHelper
    {
        private static ILog m_log { get { return LogManager.GetLogger("Common"); } }

        public static void Info(object message)
        {
            m_log.Info(message);
        }

        public static void Debug(object message)
        {
            m_log.Debug(message);
        }

        public static void Error(Exception message)
        {
            m_log.Error(message);
        }

        public static void Error(string message)
        {
            Type type = System.Reflection.MethodBase.GetCurrentMethod().DeclaringType;
            m_log.Error(type);
            m_log.Error(message);
        }

        public static void Fatal(object message)
        {
            m_log.Fatal(message);
        }
    }
}
